import request from '@/utils/request'

const jobLogApi = process.env.VUE_APP_JOB_API + '/quartzJobLog'

/**
 * 分页查询定时任务日志列表
 * @param params
 * @returns {AxiosPromise}
 */
export const pageJobLog = (params) => {
  return request({
    url: `${jobLogApi}`,
    method: 'GET',
    params
  })
}


/**
 * 根据id查询定时任务日志信息
 * @param id 定时任务日志id
 * @returns {AxiosPromise}
 */
export const getJobLog = (id) => {
  return request({
    url: `${jobLogApi}/${id}`,
    method: 'GET'
  })
}


/**
 * 根据ID删除定时任务日志
 * @param ids 定时任务日志ids
 * @returns {AxiosPromise}
 */
export const delJobLog = (ids) => {
  return request({
    url: `${jobLogApi}/${ids}`,
    method: 'DELETE'
  })
}

/**
 * 根据ID删除定时任务日志
 * @param id 定时任务日志id
 * @returns {AxiosPromise}
 */
export const cleanJobLog = (id) => {
  return request({
    url: `${jobLogApi}/clean`,
    method: 'DELETE'
  })
}
